import { notifications, waitTimeOut } from '../../common.js';
import { tpassLogin } from '../../utils.js';
async function autoInputAccount(baseInfo) {

  if (location.href.includes('beforeLogin/indexBefore/pageIndex.html')) {
    waitTimeOut(1000);
    Array.from($('.mini-tools-close')).map(item => item.click());
    if ($('.login-btn') && $('.login-btn').text().includes('登录')) {
      $('.login-btn').click();
    }
  }
  if (location.href.includes('tpass.shenzhen.chinatax.gov.cn:8443/#/login')) {
    console.log(baseInfo);
    await tpassLogin(baseInfo);
  }
}

export { autoInputAccount };
